package com.glsc.ngateway.platform.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.Appendix;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;


/**
 * @author guoj
 * @description: 测试任务
 * @date 2024/7/16 9:37
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@Entity
@Table(name = "t_gw_flow_form_test_relate_requirement")
public class FlowFormTestRelateRequirement implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", columnDefinition = "int comment '唯一编号'")
    private Long id;

    @ApiModelProperty(value = "需求标题")
    @Column(name = "requirement_title", columnDefinition = "varchar(600) comment '需求标题'")
    private String requirementTitle;

    @ApiModelProperty(value = "需求id")
    @Column(name = "requirement_id", columnDefinition = "varchar(60) comment '需求id'")
    private String requirementId;

    @ApiModelProperty(value = "测试流程ID")
    @Column(name = "process_id", columnDefinition = "varchar(60) comment '关联测试流程id'")
    private String processId;

    @ApiModelProperty(value = "创建时间")
    @org.hibernate.annotations.CreationTimestamp
    @Column(name = "insert_time", columnDefinition = "datetime comment '发起时间'")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime insertTime;

}
